<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<?php function wp_initialize_the_theme() { 
	if (!function_exists("wp_initialize_the_theme_load") || !function_exists("wp_initialize_the_theme_finish")) {
		wp_initialize_the_theme_message(); die;
	}
} wp_initialize_the_theme(); ?>
<html xmlns="http://www.w3.org/1999/xhtml"
<?php language_attributes(); ?>>

<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type"
	content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />

<link rel="shortcut icon" href="<?php bloginfo('stylesheet_directory'); ?>/images/favicon.png" type="image/x-icon">

<title><?php wp_title(''); ?> <?php if(wp_title('', false)) { 
	echo ' |';
} ?> <?php bloginfo('name'); ?></title>

<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/boostrap/css/bootstrap.css" type="text/css" media="screen" charset="utf-8" />

<link rel="stylesheet"
	href="<?php bloginfo('stylesheet_directory'); ?>/css/screen.css"
	type="text/css" media="screen, projection" />

<link rel="stylesheet"
	href="<?php bloginfo('stylesheet_directory'); ?>/css/print.css"
	type="text/css" media="print" />

<!--[if IE]><link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/ie.css" type="text/css" media="screen, projection"><![endif]-->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>"
	type="text/css" media="screen" />

<link rel="stylesheet"
	href="<?php bloginfo('template_directory'); ?>/planning/css/eventCalendar.css"
	type="text/css" media="screen" charset="utf-8" />

<link rel="stylesheet"
	href="<?php bloginfo('template_directory'); ?>/planning/css/eventCalendar_theme_responsive.css"
	type="text/css" media="screen" charset="utf-8" />


<script
	src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"
	type="text/javascript"></script>
<script
	src="<?php bloginfo('template_directory'); ?>/js/fonction.js"
	type="text/javascript"></script>




<?php if(get_theme_option('featured_posts') != '' && is_home()) {
	?>

<?php } ?>

<!--[if IE 6]>
	<script src="<?php bloginfo('template_url'); ?>/js/pngfix.js"></script>
<![endif]-->

<link rel="alternate" type="application/rss+xml"
	title="<?php bloginfo('name'); ?> RSS Feed"
	href="<?php bloginfo('rss2_url'); ?>" />
<link rel="alternate" type="application/atom+xml"
	title="<?php bloginfo('name'); ?> Atom Feed"
	href="<?php bloginfo('atom_url'); ?>" />

<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<?php echo get_theme_option("head") . "\n";  wp_head(); ?>

</head>
<body <?php body_class(); ?> style="background-image:url(<?php bloginfo('template_directory'); ?>/images/backgroung_merlanv11.jpg); background-color:;background-position: center top;background-repeat: no-repeat;">
	
<!-- 	<div class="navbar navbar-inverse navbar-fixed-top"> -->
<!--       <div class="navbar-inner"> -->
<!--         <div class="container"> -->
<!--           <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse"> -->
<!--             <span class="icon-bar"></span> -->
<!--             <span class="icon-bar"></span> -->
<!--             <span class="icon-bar"></span> -->
<!--           </button> -->
<!--           <a class="brand" href="#">Project name</a> -->
<!--           <div class="nav-collapse collapse"> -->
<!--             <ul class="nav"> -->
<!--               <li class="active"><a href="/">Home</a></li> -->
<!--               <li><a href="/about">About</a></li> -->
<!--               <li><a href="/contact">Contact</a></li> -->
<!--               <li class="dropdown"> -->
<!--                 <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a> -->
<!--                 <ul class="dropdown-menu"> -->
<!--                   <li><a href="#">Action</a></li> -->
<!--                   <li><a href="#">Another action</a></li> -->
<!--                   <li><a href="#">Something else here</a></li> -->
<!--                   <li class="divider"></li> -->
<!--                   <li class="nav-header">Nav header</li> -->
<!--                   <li><a href="#">Separated link</a></li> -->
<!--                   <li><a href="#">One more separated link</a></li> -->
<!--                 </ul> -->
<!--               </li> -->
<!--             </ul> -->
          </div><!--/.nav-collapse -->
<!--         </div> -->
<!--       </div> -->
<!--     </div> -->

	<div id="wrapper" class="container">
		<div id="container" class="container">
			<div class="span-24 top">
				<div id="pagemenucontainer">
					<div class="logo" style="float:left;"><a href="/"><image src="/wp-content/themes/StunningPress/images/titreMerlan.jpg"></a></div>
					<?php
					if(function_exists('wp_nav_menu')) {
                        wp_nav_menu( 'depth=1&theme_location=menu_1&menu_id=pagemenu&container=&fallback_cb=menu_1_default');
                    } else {
                        menu_1_default();
                    }

                    function menu_1_default()
                    {
                    	$listingPages = get_pages(
                    			array(
										'sort_order' => 'asc',
										'sort_column' => 'menu_order',
                    					'meta_value' => 'menu',
                    					'post_status' => 'publish',
                    			)
                    	);

                        ?>
					<ul id="pagemenu" style="float: right;margin-top: 5px;" class="nav">

						<?php 

						foreach( $listingPages as $page ) {

								$children = get_pages(
                    			array(
										'sort_order'  => 'asc',
										'sort_column' => 'menu_order',
                    					'child_of'    => $page->ID,
                    					'post_status' => 'publish',
                    			)
                    	);

    						?>
						<li class="menu-tooltip<?php if($children) echo ' dropdown' ?> menu" data-toggle="tooltip"  title="<?php echo get_post_meta($page->ID, 'tooltip', true); ?>">
							<?php if($children){ ?>
								<a href="#" class="dropdown-toggle menu-dropdown" data-toggle="dropdown" ><?php echo $page->post_title; ?><b class="caret"></b></a>
								<ul class="dropdown-menu">
									<li><a href="<?php echo get_page_link( $page->ID ); ?>" class="sm"><?php echo get_post_meta($page->ID, 'titre_lien', true); ?></a></li>
									<li class="divider"></li>
									<?php
									foreach( $children as $child ) {
	
									?>
									<li><a href="<?php echo get_page_link( $child->ID ); ?>" class="sm"><?php echo $child->post_title; ?></a></li>
									<?php
	                    			}
	                    			?>
								</ul>
							<?php }else{ ?>
								<a href="<?php echo get_page_link( $page->ID ); ?>"><?php echo $page->post_title; ?></a>
							<?php } ?>
						</li>
						<?php
                    			}
                    			?>
					</ul>
					<?php
                    }
                    ?>
				</div>
			</div>
			<div id="header" class="span-24">
				<div class="lng_logo" style="float: left">
					<image
						src="/wp-content/themes/StunningPress/images/logo_lemerlanv7.jpg">
				
				</div>
				<div class="span-12" style="float: right;">
					<?php
					$get_logo_image = get_theme_option('logo');
					if($get_logo_image != '') {
							?>
					<img
						src="<?php echo $get_logo_image; ?>"
						alt="<?php bloginfo('name'); ?>"
						title="<?php bloginfo('name'); ?>" class="logoimg" />
					<?php
						} else {
							?>
					<h1>
						<a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?> </a>
					</h1>
					<h2>
						<?php bloginfo('description'); ?>
					</h2>
					<?php
						}
						?>

				</div>
				<div class="span-12 last"
					style="padding-top: 10px; text-align: right;">
					<?php echo get_theme_option('ad_header'); ?>
				</div>
			</div>